package com.exam.common.enums.impl;

import com.exam.common.enums.EnumCode;
/**
 * @Description 考试枚举
 * @Author ChengKe
 * @Date  2023-01-07
 */
public enum ExamTypeEnum implements EnumCode {

    Software(1, "软件工程"),
    Computer(2, "计算机科学与技术"),
    Media(3, "数字媒体技术"),
    Food_Science(4, "食品科学与工程"),
    Food_Quality(5, "食品质量与安全"),
    Bioengineering(6, "生物工程"),
    Landscape(7, "风景园林"),
    Other_Test(8, "其他考试"),

    ;

    private final long code;
    private final String msg;

    ExamTypeEnum(long code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public long getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    public static ExamTypeEnum returnValue(String str) {
        ExamTypeEnum[] values = values();
        for (ExamTypeEnum value : values) {
            if (value.toString().equals(str) ) {
                return value;
            }
        }
        return Software;
    }
}
